/* 节流 */
const throttle = function(callback, time = 700) {
	let old = 0
	return function() {
		let now = new Date()
		let args = arguments
		if (now - old >= time) {
			callback.apply(this, args)
			old = now
		}
	}
}

export default throttle
